﻿using Parylene_CVD.DAL;
using Parylene_CVD.DataTransfer;
using Parylene_CVD.Model.DModels;
using Parylene_CVD.Tools;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Parylene_CVD.Model
{
    /// <summary>
    /// 用于初始化各个全局变量
    /// </summary>
    public class ReadGlobalData
    {
        public static void ReadDeviceWithStatuses()
        {
            DeviceDAL deviceDAL = new DeviceDAL();
            List<Device> devices = deviceDAL.GetAllDevice();
            GlobalVariables.deviceWithStatuses = DeviceToDeviceWithStatus.GetDevicesWithStatus(devices);
        }

        public static void ReadWebSocketServer()
        {
            GlobalVariables.webSocketServer = new WebSocketServer("http://localhost:5000/");
        }
    }
}
